<#list 1..pageBean.pages as i>
    <span style="margin-right: 23px;">
        <a href="javascript:void(0);" onclick="pageNum(${i})">
            <span <#if pageBean.pageNum = i> style="color: red;" </#if>>${i}</span>
        </a>
   </span>
</#list>
<select name="pageSize" id="pageSize">
    <option value="10" <#if pageBean.pageSize==10>selected</#if>>10</option>
    <option value="20" <#if pageBean.pageSize==20>selected</#if>>20</option>
    <option value="30" <#if pageBean.pageSize==30>selected</#if>>30</option>
    <option value="40" <#if pageBean.pageSize==40>selected</#if>>40</option>
</select>

<script type="text/javascript">
    function pageNums (pageNum) {
        let pageSize = document.getElementById('pageSizeSelect').value
        let url = window.location.href
        document.location.href = url.substring(0, url.indexOf('?')) + '?pageSize=' + pageSize + '&pageNum=' + pageNum
    }
</script>